package com.nuanshui.heatedloan.msgcenter.apppush.bean;

import com.nuanshui.heatedloan.msgcenter.apppush.constant.AppPushResultStatus;
import com.nuanshui.heatedloan.msgcenter.integration.AppPushMsgBody;
import com.nuanshui.heatedloan.msgcenter.model.AppPushMessage;

import java.util.ArrayList;
import java.util.List;

/**
 * 推送结果
 * @param 
 * @author guohao
 * @date 2017年2月10日 下午4:41:07
 * @since $
 */
public class AppPushResult {

	public AppPushResult() {
		super();
	}

	public AppPushResult(String status) {
		super();
		this.status = status;
	}

	/**
	 * 推送的状态
	 *
	 * @see AppPushResultStatus
	 */
	private String status = AppPushResultStatus.SUCCESS;

	private boolean async = false; //是否是异步推送

	private List<AppPushMsgBody> msgs = new ArrayList<AppPushMsgBody>(); //三方推送接口信息


	public boolean isAsync() {
		return async;
	}

	public void setAsync(boolean async) {
		this.async = async;
	}

	public void addMsg(AppPushMsgBody msg) {
		msgs.add(msg);
	}

	public List<AppPushMsgBody> getMsgs() {
		return msgs;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public boolean isSuccess() {
		return AppPushResultStatus.SUCCESS.equals(status);
	}

}
